home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / asmutil / asm_n_z.zip / PALET2A.DOC < prev    next >
Text File  |  1988-05-14  |  10KB  |  308 lines

  1.  
  2.  
  3.  
  4.  
  5.                                   Documentation
  6.                                        for
  7.                              Palet2a.com, Release 2a
  8.  
  9. Overview
  10. --------
  11.  
  12. Palet.com is a TSR (Terminate, but Stay Resident) program that ties into int
  13. 10h and traps (or allows to pass) any changes to the values stored in the EGA
  14. registers. It occupies only 448 bytes of memory (exclusive of memory taken up
  15. by its environment). The program will not reload, but will pass any parameters
  16. to the resident portion when you call it subsequent times.
  17.  
  18.                              Command line instructions
  19.  
  20. palet
  21. -----
  22.  
  23. Entering this will display a usage screen to refresh your memory, it will not
  24. install the resident portion of palet.
  25.  
  26. palet d       (reset to default)
  27. --------
  28.  
  29. Entering this will install (if not already installed) the TSR portion of palet
  30. and write the default values stored within palet to the EGA registers. This is
  31. a good way to "clean everything up" after playing with setting the EGA regis-
  32. ters with the next command. The 'd' command should precede any other parameters
  33. on the command line.
  34.  
  35. palet d1 d2 .... d16    (set EGA register values)
  36. --------------------
  37.  
  38. Entering this will set any or all of the sixteen EGA palette registers. The
  39. numbers d1, d2, etc. are  two digit decimal numbers that represent one of the
  40. 64 valid values for the EGA colors. The numbers may be separated by a space,
  41. or you may run all digits together (in which case any single digit must be
  42. preceded by a zero, ie.: 7 4 16 is same as: 070416). It is not necessary to
  43. enter values for registers above the ones you wish to change. Values for
  44. registers you wish to remain unchanged can be replaced with a period, ie.:
  45.  
  46.         palet ..7....2    will change registers 3 and 8, and leave others
  47.                           unchanged.
  48.  
  49. This command will change the EGA registers and by default, will set the 'X'
  50. switch, which will allow other programs to change the EGA registers also (see
  51. the exclude and exclude text commands).
  52.  
  53.  
  54. palet b[+|-] (blinking commands)
  55.  
  56. Entering palet b+ will turn blinking on.  Entering palet b- will turn it off. 
  57. Entering palet b will turn it on if it was off and off if it was on.  The
  58. original setting is off.
  59.  
  60.  
  61.  
  62.                                     Page 1
  63.  
  64.  
  65.  
  66.                    Documentation for Palet2a.com, Release 2a
  67.  
  68.  
  69. palet u[+|-|<n>] (underlining commands)
  70.  
  71. Entering palet u+ will turn underlining on at the bottom of the character. 
  72. Entering palet u- will turn underlining off.  Entering palet u, immediately
  73. followed by a one or two digit decimal number will turn underlining on if the
  74. line represented by the number is in the character and off otherwise.  For
  75. example, palet u3 will underline (strike-out) at line 3.  Just like the
  76. palette register numbers above, be sure that you follow a one-digit number
  77. with either a space or a letter.  Finally, entering palet u will turn
  78. underlining on at the bottom of the character if it is off and off if it was
  79. on.  The original setting is off.
  80.  
  81. Technical note:  palet learns where the bottom of the character is from Video
  82. BIOS data location 40:85.  BIOS int 11H updates this value.  If u+ doesn't
  83. work for your character set, you might want to check if its software does.
  84.  
  85. palet e    (exclude changes)
  86. -------
  87.  
  88. Entering this will set the exclude changes switch. Palet will now prevent any
  89. attempt to change the values in the EGA registers, no matter what display mode
  90. is set (text or graphics). If you have programs that display in graphics mode,
  91. but don't provide a way to set the colors used, then this is a way to do it.
  92. Some trial and error will usually show you which EGA registers the program is
  93. using so that you can set the registers to suit your preference. Generally, the
  94. easiest way to use palet for this is in a batch file, ie.:
  95.         echo off
  96.         palet d1 d2 .....d16 e
  97.         program            (program to run)
  98.         palet d
  99.  
  100. This file will set the registers of the EGA, make the change exclusive and load
  101. the program to run. Upon exiting the program, palet will set the EGA registers
  102. to the default value, leaving the exclude switch set.
  103.  
  104. palet t     (exclude text color changes)
  105. -------
  106.  
  107. This is a variation on the exclude command, as it will only trap text mode
  108. color changes, ie. attempts to change EGA register values while the display is
  109. in graphics mode will go through.
  110.  
  111. palet x    (turn off exclusions)
  112. -------
  113.  
  114. This command will turn off e or t exclusions, and allow other software to reset
  115. the EGA registers.
  116.  
  117. palet f (disable palet) (turn oFf)
  118. -------
  119.  
  120. This command will disable palet.  Any command with a legal argument will
  121. enable it again.
  122.  
  123.                                     Page 2
  124.  
  125.  
  126.  
  127.                    Documentation for Palet2a.com, Release 2a
  128.  
  129.  
  130. palet n (enable palet) (turn oN)
  131. -------
  132.  
  133. This command will enable palet.  Use it after "palet f" if you don't want to
  134. change anything in the previous setup.
  135.  
  136.  
  137. Command usage
  138. -------------
  139.  
  140. All commands can be combined in any way, with the exception of the 'd' command,
  141. which when used, should precede all other parameters on the command line.
  142.  
  143.         examples:
  144.         --------
  145.  
  146.         palet ...4...16e    will write the octal values 4 and 16 (4 and 14 dec-
  147.                             imal) to the 4th and 8th registers, and set the
  148.                             exclude switch.
  149.  
  150.         palet d..7....2t    will write default values to 16 registers, then
  151.                             change the 3rd and 8th registers, and set the text
  152.                             exclude switch.
  153.  
  154.         palet dx            will write default values to 16 registers, and turn
  155.                             off the exclude switches.
  156.  
  157. Of course it would be silly to combine 'x' with 't' or 'e' in the same call.
  158. -----------------
  159.  
  160. Technical
  161. ---------
  162.  
  163. When palet is called, it first checks for DOS 2.0 or higher, and the existence
  164. of the EGA, then 'hooks' itself into int 10h (video interrupt). EGA registers
  165. are reset (if requested in the parameters), and palet's internal switches are
  166. set (if specified in the parameters). Palet then removes most of itself from
  167. memory, leaving behind the TSR portion that monitors all calls to int 10h.
  168.  
  169. A flag is used within palet to monitor the current display mode, this way
  170. palet can determine whether or not to allow changes to the EGA registers to
  171. pass (based on the 'E' and 'T' switch settings).
  172.  
  173. Any display mode function call to the EGA will reset all EGA registers to the
  174. system default values. Palet will allow the display mode change to go through,
  175. then check the 'T' and 'E' switch settings, if the display mode has been
  176. changed to graphics, and the 'T' switch is set, then palet will allow any EGA
  177. register changes to pass, until the display mode is changed back to text. On
  178. the other hand, if the 'E' switch is set, then palet will immediately write the
  179. values stored in it's buffer area to the EGA registers, and trap any attempts
  180. to change those values. Any EGA register changes initiated by a call to palet
  181. will be allowed to pass with any switch settings (palet knows when it is called
  182. by itself).
  183.  
  184.                                     Page 3
  185.  
  186.  
  187.  
  188.                    Documentation for Palet2a.com, Release 2a
  189.  
  190.  
  191. A table of palet's default values is contained within the program code (out-
  192. side of the resident portion). By carefully patching palet with debug, you can
  193. customize the default values to your preference. DOS normally uses the 8th EGA
  194. register for its text color (white), and the 1st register for its background
  195. color; the 3rd EGA register normally contains the value for green. If you pre-
  196. fer green text on black, you can switch the values of the 3rd and 8th EGA reg-
  197. isters (this way you still have white available, albeit in the 3rd EGA regis-
  198. ter). Use debug to patch the locations below:
  199.  
  200. address        value now (hex)    EGA register
  201. ----------------------------------------------
  202. 0a00h          1fh               Underline line 
  203. 0a01h           0h                    Blin